package tr.edu.metu.is.mega.client.core;

import com.extjs.gxt.ui.client.widget.Info;
import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Adapter for {@link AsyncCallback}
 */
public abstract class AsyncCallbackAdapter<T> implements AsyncCallback<T> {

    /**
     * {@inheritDoc}
     */
    @Override
    public void onFailure(Throwable caught) {
        Info.display("Error", "Failed, reason:" + caught.toString());
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public abstract void onSuccess(T result);

}
